{literal}
<script type="text/javascript">

function forumRedirect(usergroupid)
{
	task = eval("document.cpform.u" + usergroupid + ".options[document.cpform.u" + usergroupid + ".selectedIndex].value");

	switch(task)
	{
	{/literal}
		case 'show':
		window.location.href = "{url link='admin.main.members'}type_"+ usergroupid +"/";
		break;
		case 'edit':
		case 'delete':
		window.location.href = "{url link='admin.config.memberships'}type_"+ usergroupid +"/";
		break;
		default:
			return false;
		break;
	{literal}
	}
}

</script>
{/literal}
<form method="post" action="{url link='current'}" name="cpform" id="cpform">
<table style="width:100%;" class="forumline" cellspacing="0">
<tr>
    <td class="row-header" colspan="3"><span>{language text='Mod_Account.default_usergroups'}</span></td>
</tr>
<tr>
	<th>{language text='title'}</th>
	<th>{language text='Mod_Account.users'}</th>
	<th>{language text='actions'}</th>
</tr>
{foreach from=$aItemsSpecial item=aSpecial}
<tr>
	<td class="row2">
		<b>{$aSpecial.title}</b>
	</td>
	<td class="row2" style="text-align:center;">
		{if $aSpecial.membership_id != 2}{$aSpecial.total}{else}N/A{/if}
	</td>
	<td class="row2" style="text-align:right;">
		<select name="u{$aSpecial.membership_id}" onchange="forumRedirect({$aSpecial.membership_id});" style="width:175px;">
			<option value="edit">{language text='Mod_Account.edit_usergroup'} (ID: {$aSpecial.membership_id})</option>
			{if $aSpecial.membership_id != 2}
			<option value="show">{language text='Mod_Account.show_all_users'}</option>
			{/if}
		</select>
		<input type="button" value="Go" name="go" onclick="forumRedirect({$aSpecial.membership_id});" />
	</td>
</tr>
{/foreach}
<tr>
    <td class="row-header" colspan="3"><span>{language text='Mod_Account.custom_usergroups'}</span></td>
</tr>
<tr>
	<th>{language text='title'}</th>
	<th>{language text='Mod_Account.users'}</th>
	<th>{language text='actions'}</th>
</tr>
{foreach from=$aItems item=aItem}
<tr>
	<td class="row2">
		<b>{$aItem.title}</b>
	</td>
	<td class="row2" style="text-align:center;">
		{$aItem.total}
	</td>
	<td class="row2" style="text-align:right;">
		<select name="u{$aItem.membership_id}" onchange="forumRedirect({$aItem.membership_id});" style="width:175px;">
			<option value="edit">{language text='Mod_Account.edit_usergroup'} (ID: {$aItem.membership_id})</option>
			<option value="show">{language text='Mod_Account.show_all_users'}</option>
			<option value="delete">{language text='delete'}</option>
		</select>
		<input type="button" value="Go" name="go" onclick="forumRedirect({$aItem.membership_id});" />
	</td>
</tr>
{/foreach}
<tr>
	<td class="catBottom" colspan="3" style="text-align:center;">
		<input type="button" name="act[update_membership]" value="{language text='menu.memberships.create_new'}" style="cursor:pointer;font-size:10pt;" onclick="window.location.href='{url link='admin.config.memberships' create='new'}';" />
	</td>
</tr>
</table>
</form>